import React, { Component, createRef } from "react";
import { Toast } from "antd-mobile";
import { connect } from "react-redux";
import yhTools from "@/tools/yh";

// 组件
import MainLayout from "../../../component/mainLayout/mainLayout";
import "./iframeAgreements.scss";

/**
 * 描述：
 * 作者：zenghq
 * 日期：2020-06-08
 */
class iframeAgreements extends Component {
	constructor(props) {
		super(props);
		this.state = {
			title: "",
			src: ""
		};
	}
	/*******************生命周期 start************************/
	componentDidMount = () => {
		console.log(" this.props.location.state", this.props.location.state);
	};
	/**渲染 */
	render() {
		const { state = {} } = this.props.location;
		const { src, title } = state;
		const _pageParams = {
			header: {
				title,
				src
			},
			history: this.props.history
		};
		return (
			<MainLayout pageParams={_pageParams}>
				<iframe className="iframe" src={src}></iframe>
			</MainLayout>
		);
	}
}

export default iframeAgreements;
